<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>棋牌后台</title>
    <style type="text/css">
        #left,#right{float: left;outline: 1px solid red;min-height:500px;max-height: 100%;height: 900px}
        #left{width:150px;overflow-x: hidden }

    </style>
</head>
<body>

<div id="left">
    <div id="currentGame">
        <select id="gameSelect" style="display: block;margin: auto">
            <{html_options options=$games selected=$currentGame}>
        </select>
    </div>
    <ul id="menu">
        <li><a href="<{U('Game/getAgentBenefit')}>" target="content">代理分成</a></li>
        <li><a href="<{U('Game/getLowerAgentstat')}>" target="content">下级代理业绩</a></li>
        <li><a href="<{U('Game/agentCount2')}>" target="content">代理统计</a></li>
        <li><a href="<{U('Game/getUserList')}>" target="content">用户详情</a></li>
        <li><a href="<{U('Game/agentCountView')}>" target="content">代理统计2</a></li>
        <li><a href="<{U('Game/getDailyCount')}>" target="content">游戏统计汇总</a></li>
    </ul>
</div>
<div id="right">
    <iframe id="content" name="content" width="100%" height="100%" frameborder="0"></iframe>
</div>

<script src="/Public/js/jquery-2.1.4.min.js"></script>
<script>
    $(document).ready(function(){
        resetDiv()
    });
    $(window).resize(resetDiv);
    function resetDiv(){
        var totalWidth=$("body").width();
        var leftWidth=$("#left").width();
        $('#right').width(totalWidth-leftWidth-50);
        $('#left,#right').height($(document).height()-50);
    }

    $('#gameSelect').on('change',function(){
        $.post("<{U('changeCurrentGame')}>",{game:this.value},function(res){
            if (res.status!=0){
                alert(res.msg);
            }
        },"JSON");

    })

</script>
</body>
</html>